﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Department.aspx.cs" Inherits="XHCTMS.VIEW.Department" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title></title>
    <link rel="shortcut icon" href="/favicon.ico"/>
	<link rel="apple-touch-icon" href="/apple-touch-icon.png"/>
	<link rel="stylesheet" href="css/style.css?v=2"/>
	
	<!-- fluid 960 -->
	<link rel="stylesheet" type="text/css" href="css/text.css" media="screen" />
	<link rel="stylesheet" type="text/css" href="css/layout.css" media="screen" />
	<link rel="stylesheet" type="text/css" href="css/grid.css" media="screen" />
	<!-- superfish menu -->
	<link rel="stylesheet" type="text/css" href="css/superfish.css" media="screen" />
	<!-- tags css -->
	<link rel="stylesheet" href="css/jquery.tagsinput.css"/>
	<!-- treeview css -->
	<link rel="stylesheet" href="css/jquery.treeview.css"/>
	<!-- dataTable css -->
	<link rel="stylesheet" href="css/demo_table_jui.css"/>


	<!-- fluid GS -->
	<link rel="stylesheet" type="text/css" href="css/fluid.gs.css" media="screen" />
	<!--[if lt IE 8 ]>
	<link rel="stylesheet" type="text/css" href="css/fluid.gs.lt_ie8.css" media="screen" />
	<![endif]-->

	<!-- //jqueryUI css -->
	<link type="text/css" href="css/custom-theme/jquery-ui-1.8.13.custom.css" rel="stylesheet" />
	
	<!-- //jquery -->
	<!-- <script src="//ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"></script> -->
	<script type="text/javascript" src="js/libs/jquery-1.5.1.min.js"></script>
	<script type="text/javascript">	    !window.jQuery && document.write(unescape('%3Cscript src="js/libs/jquery-1.5.1.min.js"%3E%3C/script%3E'))</script>
	<!-- //jqueryUI -->
	<script type="text/javascript" src="js/jquery-ui-1.8.13.custom.min.js"></script>
	<script type="text/javascript" src="js/jquery-fluid16.js"></script>
	<script type="text/javascript" src="js/plugins.js"></script>
	<script type="text/javascript" src="js/script.js"></script>
	
	<!-- //xoxco tags plugin https://github.com/xoxco/jQuery-Tags-Input -->
	<script type="text/javascript" src="js/jquery.tagsinput.min.js"></script>
	<link rel="stylesheet" href="css/jquery.tagsinput.css"/>
	
	<!--[if lt IE 7 ]>
	<script src="js/libs/dd_belatedpng.js"></script>
	<script> DD_belatedPNG.fix('img, .png_bg');</script>
	<![endif]-->
	<!-- modernizr -->
	<script type="text/javascript" src="js/libs/modernizr-1.7.min.js"></script>
	
	<!-- superfish menu and needed js for menu -->
	<script type="text/javascript" src="js/superfish.js"></script>
	<script type="text/javascript" src="js/supersubs.js"></script>
	<script type="text/javascript" src="js/hoverIntent.js"></script>

	<!-- treeview -->
	<script type="text/javascript" src="js/jquery.treeview.js"></script>
	
	<!-- dataTable -->
	<script  type="text/javascript" src="js/jquery.dataTables.min.js"></script>

    <style type="text/css">
    .txt
    {
        margin-left:10px;
        width: 150px;
        margin-right:20px;
        margin-top:5px;        
        }
        .dialog_link {
    padding: 0.4em 1em 0.4em 20px;
    position: relative;
    text-decoration: none;
}
 .span-ui-icon {
    left: 0.2em;
    margin: -8px 5px 0 0;
    position: absolute;
    top: 50%;
}
        </style>
	<script type="text/javascript">
//	    $(function () {
//	        $("#AddEvent").dialog({
//	            autoOpen: false, width: 530, modal: true,
//	            buttons: {
//	                "增加部门": function () {
//	                    $("#txtDepId").val($("#txtID").val());
//	                    $("#txtDepName").val($("#txtName").val());
//	                    $("#txtDesc").val($("#txtDepartmentDesc").val());
//	                    $("#btnAdd").trigger("click");
//	                },
//	                "取消": function () {
//	                    $(this).dialog("close");
//	                }
//	            }
//	        });

//	        $("#divAdd").click(function () {
//	            $("#AddEvent").dialog("open");
//	        });
//	    });


//	    $(function () {
//	        $("#SearchEvent").dialog({
//	            autoOpen: false, width: 530, modal: true,
//	            buttons: {
//	                "查询": function () {
//	                    $("#txtDepName").val($("#txtSearchName").val());
//	                    $("#btnSearch").trigger("click");
//	                },
//                    "查询已删除的部门": function () {
//                        $("#btnSearch").trigger("click");
//                    },
//	                "取消": function () {
//	                    $(this).dialog("close");
//	                }	                
//	            }
//	        });
//	        $("#divSearch").click(function () {
//	            $("#SearchEvent").dialog("open");
//	        });            
//	    });

//	    $(function () {
//	        $("#UpdateEvent").dialog({
//	            autoOpen: false, width: 530, modal: true,
//	            buttons: {
//	                "修改": function () {
//	                    $("#txtDepId").val($("#txtUpdateId").val());
//	                    $("#txtDepName").val($("#txtUpdateName").val());
//	                    $("#txtDesc").val($("#txtUpdateDesc").val());
//	                    $("#btnUpdate").trigger("click");
//	                },
//	                "取消": function () {
//	                    $(this).dialog("close");
//	                }
//	            }
//	        });
//	        $("#divUpdate").click(function () {
//	            $("#UpdateEvent").dialog("open");
//	        });
//	    });	    

	    $(function () {
	        $("#divDel").dialog({
	            autoOpen: false, width: 300, modal: true,
	            buttons: {
	                "确认": function () {
	                    $("#btnDelete").trigger("click");
	                },
	                "取消": function () {
	                    $(this).dialog("close");
	                }
	            }
	        });

	        $("#divDelete").click(function () {
	            $("#divDel").dialog("open");
	        });
	    });

	    $(function () {
	        $("#divAlter").click(function () {
	            $("#btnAlter").trigger("click");
	        });

	        $("#divUpdate").click(function () {
	            $("#btnUpdate").trigger("click");
	        });

	        $("#divAdd").click(function () {
	            $("#btnAdd").trigger("click");
	        });

	        $("#divSearch").click(function () {
	            $("#btnSearch").trigger("click");
	        });

	        $("#list table tbody tr").click(function () {
	            $(this).find("#rdoDelete").attr("checked", true);
	            if ($(this).find("#rdoDelete").attr("checked")) {
	                $("#txtDepId").val($(this).attr("id"));
	            }
	        });

	        
	    });
    </script>
</head>
<body>
  
    <form id="form2" runat="server">
  <div id="divDel" style="display:none;" title="提示" >请确认删除信息</div>
  <%--<div id="divSear" style="display:none" title="提示" >不能有空</div>--%>
    <div class="box">
		<h2>
			<a href="#" id="toggle-forms">部门信息管理</a>
		</h2> 
			<div class="block" id="forms">
					<fieldset>
						<legend>操作区</legend>
                            <div>
                                
                                <asp:TextBox ID="txtDepId" runat="server" class="txt" style="display:none"></asp:TextBox>
                             <label id="lblDepName">名称</label>	
                                <asp:TextBox ID="txtDepName" runat="server" class="txt"></asp:TextBox>
                               
                               <label id="lblFlag">部门状态</label> 
                               <asp:RadioButton ID="rbtnYes" runat="server" GroupName="Flag" Width="20px" TextAlign="Left"/>存在
                               <asp:RadioButton ID="rbtnNo" runat="server" GroupName="Flag" Width="20px" TextAlign="Left"/>不存在
                               <br />
                               <br />
                               <label id="lblDesc">描述</label>
                               &nbsp;&nbsp;                             
                                <asp:TextBox ID="txtDesc" runat="server" Width="410px"></asp:TextBox>     
                                <br />
                                <br />
                                <div id="divAdd" class="six column">
									      
								<a href="#" id="dialog_link1" class=" dialog_link ui-state-default ui-corner-some floatRight"><span class=" span-ui-icon ui-icon ui-icon-circle-plus "></span>增加</a>
                                 <asp:Button ID="btnAdd" runat="server"  style=" display:none"  UseSubmitBehavior ="false" Text="Button" OnClick="btnAdd_Click"/>
								</div>
                                     
                                <div id="divSearch" class="six column">
									      
								<a href="#" id="A2" class=" dialog_link ui-state-default ui-corner-some floatRight"><span class=" span-ui-icon ui-icon ui-icon-search "></span>查询</a>
                                    <asp:Button ID="btnSearch" runat="server"  style=" display:none"  UseSubmitBehavior ="false" Text="Button"  onclick="btnSearch_Click" />     
								</div>
                                <div id="divAlter" class="six column">
									      
									<a href="#" id="A4" class=" dialog_link ui-state-default ui-corner-some floatRight"><span class=" span-ui-icon ui-icon ui-icon-arrowrefresh-1-e "></span>刷新</a>
                                    <asp:Button ID="btnAlter" runat="server"  style=" display:none"  UseSubmitBehavior ="false" Text="Button" onclick="btnAlter_Click" />  
								</div>
                                 <div id="divUpdate" class="six column">
									      
									<a href="#" id="A3" class=" dialog_link ui-state-default ui-corner-some floatRight"><span class=" span-ui-icon ui-icon ui-icon-check "></span>修改</a>
                                     <asp:Button ID="btnUpdate" runat="server" Text="Button" style=" display:none"  UseSubmitBehavior ="false" onclick="btnUpdate_Click" /> 
									  </div>
                                         <div id="divDelete" class="six column">
                                             <asp:Button ID="btnDelete" runat="server"  style=" display:none"  UseSubmitBehavior ="false" Text="Button" onclick="btnDelete_Click" />
									    <a href="#" id="A1" class=" dialog_link ui-state-default ui-corner-some floatRight"><span class=" span-ui-icon ui-icon ui-icon-trash "></span>删除</a>
									     
									</div>
                                   </div>                                        
								</fieldset>
							</div>
					</div>
   
    
    
    <div class="box">
						<h2>
							<a href="#" id="toggle-list">部门信息</a>
						</h2>
						<div class="block" id="list">						
						<asp:Repeater ID="rperData" runat="server">                        					         
                            <HeaderTemplate>
                                 <table cellpadding="0" cellspacing="0" border="0" class="display" onclick="javascript:GoSel(event);" id="example">
                                 <thead >
                                    <tr>
                                        <th width="7%">
                                    
                                        </th>
                                        <th width="20%">
                                            名称
                                        </th>
                                        <th>
                                            描述
                                        </th>
                                        <th width="12%">
                                            当前状态
                                        </th>
                                    </tr>
                                </thead>
                            </HeaderTemplate>

                            <ItemTemplate>
                               <tbody>
                                    <tr class="odd gradeA" id="<%# Eval("dep_id") %>">
                                    <td>
                                        <input id="rdoDelete" type="radio" name="oooo"/>
                                    </td>
                                        <td>
                                            <%# Eval("dep_name") %>
                                        </td>
                                        <td>
                                            <%# Eval("dep_desc") %>
                                        </td>
                                        <td>
                                            <%# Eval("dep_flag") %>
                                        </td>
                                    </tr>
                               </tbody>
                            </ItemTemplate>

                            <FooterTemplate>
                               <tfoot>
                                    <tr>
                                        <th>
                                        </th>
                                        <th>
                                          名称
                                        </th>
                                        <th>
                                          描述
                                        </th>
                                        <th>
                                          当前状态
                                        </th>
                                    </tr>
                               </tfoot>
                               </table>
                            </FooterTemplate>
                        </asp:Repeater>
                        </div>
					</div>
<%--             <div id="AddEvent" style="display:none" title="新部门">
                 <asp:Label ID="lblName" runat="server" Text="名称"></asp:Label>&nbsp;&nbsp;&nbsp;
                 <asp:TextBox ID="txtName" runat="server" class="txt"></asp:TextBox><br />
                 <asp:Label ID="lblDepartmentDesc" runat="server" Text="描述"></asp:Label>
                 &nbsp;&nbsp;
                 <asp:TextBox ID="txtDepartmentDesc" runat="server" class="txt" style="width:410px"></asp:TextBox>
             </div>             
            
             
             
             <div id="SearchEvent" style="display:none" title="查询信息">
                 <asp:Label ID="lblSearchName" runat="server" Text="名称"></asp:Label>
                 <asp:TextBox ID="txtSearchName" runat="server" class="txt"></asp:TextBox>
                 <label id="Label1">部门状态</label>
                 <asp:RadioButton ID="RadioButton1" runat="server" GroupName="Flag" Width="20px" TextAlign="Left" />存在
                 <asp:RadioButton ID="RadioButton2" runat="server" GroupName="Flag" Width="20px" TextAlign="Left"/>不存在
             </div>


             <div id="UpdateEvent" style="display:none" title="修改信息">
                 <asp:Label ID="lblUpdateId" runat="server" Text="流水号"></asp:Label>
                 <asp:TextBox ID="txtUpdateId" runat="server"  class="txt"></asp:TextBox>&nbsp;&nbsp;&nbsp;
                 <asp:Label ID="lblUpdateName" runat="server" Text="名称"></asp:Label>&nbsp;&nbsp;&nbsp;
                 <asp:TextBox ID="txtUpdateName" runat="server" class="txt"></asp:TextBox><br />
                 <asp:Label ID="lblUpdateDesc" runat="server" Text="描述"></asp:Label>
                 &nbsp;&nbsp;
                 <asp:TextBox ID="txtUpdateDesc" runat="server" class="txt" style="width:410px"></asp:TextBox>
             </div>--%>
    </form>
  
</body>
</html>

